/*
 * @Descripttion: 存货核算
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-07-06 15:12:08
 * @LastEditors: GaoWei
 * @LastEditTime: 2021-07-16 10:46:08
 */
import { axios } from '../../utils/request'

const api = {
    auditUrl: '/audit',                     //钩稽
    accountUrl: '/inventoryAccounting',     //核算


    saveAccountingFieldtUrl: '/saveAccountingField',    //保存显示字段
    getAccountingFieldUrl: '/getAccountingField',       //获取显示字段


    evaluationListUrl: '/getEvaluationList',                //获取暂估核算列表
    saveEvaluationListUrl: '/saveEvaluationList',           //保存暂估单

    invoiceListUrl: '/getInvoiceList',                      //获取外购发票列表
    warehousingListUrl: '/getPurchaseWarehousingList',      //获取采购/委外入库核算列表

    getProductReceiveListUrl: '/getProductReceiveList',          //自制/委外/其他入库核算 列表
    productReceiveUrl: '/accountingProductReceiveList',          //自制/委外/其他入库 入库核算

    getOutInventoryListUrl: '/getOutInventoryAccountingList',       //获取材料/委外/产成品出库核算列表
    outInventoryUrl: '/outInventoryAccounting',                     //材料出库核算
    productAccountingUrl: '/productAccounting',                     //产成品出库核算


}
/**
 * 勾稽
 */
export function auditApi(data) {
    return axios({
        url: api.auditUrl,
        method: "post",
        data: data
    })
}

/**
 * 获取暂估核算列表
 */
export function getEvaluationListApi(data) {
    return axios({
        url: api.evaluationListUrl,
        method: "get",
        params: data
    })
}

/**
 * 获取外购发票列表
 */
export function getInvoiceListApi(data) {
    return axios({
        url: api.invoiceListUrl,
        method: "get",
        params: data
    })
}

/**
 * 获取外购入库核算列表
 */
export function gwtWarehousingListApi(data) {
    return axios({
        url: api.warehousingListUrl,
        method: "get",
        params: data
    })
}

/**
 * 核算
 */
export function accountApi(data) {
    return axios({
        url: api.accountUrl,
        method: "post",
        data: data
    })
}

/**
 * 保存暂估价
 */
export function saveEvaluationListApi(data) {
    return axios({
        url: api.saveEvaluationListUrl,
        method: "post",
        data: data
    })
}

/**
 * 保存显示的字段
 */
export function saveAccountingFieldtApi(data) {
    return axios({
        url: api.saveAccountingFieldtUrl,
        method: "post",
        data: data
    })
}

/**
 * 获取外购入库核算列表
 */
export function getAccountingFieldApi(data) {
    return axios({
        url: api.getAccountingFieldUrl,
        method: "get",
        params: data
    })
}

/**
 * 自制/委外/其他入库核算列表
 */
export function getProductReceiveListApi(data) {
    return axios({
        url: api.getProductReceiveListUrl,
        method: "get",
        params: data
    })
}


/**
 * 自制/委外/其他入库核算
 */
export function productReceiveApi(data) {
    return axios({
        url: api.productReceiveUrl,
        method: "post",
        data: data
    })
}
/**
 * 获取材料/产成品出库核算列表
 */
 export function outInventoryListApi(data) {
    return axios({
        url: api.getOutInventoryListUrl,
        method: "get",
        params: data
    })
}
/**
 * 材料出库核算
 */
 export function outInventoryAccountingApi(data) {
    return axios({
        url: api.outInventoryUrl,
        method: "post",
        data: data
    })
}
/**
 * 产成品出库核算
 */
 export function outproductAccountingApi(data) {
    return axios({
        url: api.productAccountingUrl,
        method: "post",
        data: data
    })
}

